<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{% load djblets_utils %}
{% load i18n %}

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>{% block title %}{% endblock %} | Review Board</title>
{% block extrahead %}{% endblock %}
  <script type="text/javascript">
    var AJAX_SERIAL = "{{AJAX_SERIAL}}";
    var MEDIA_SERIAL = "{{MEDIA_SERIAL}}";
    var MEDIA_URL = "{{MEDIA_URL}}";
    var SITE_ROOT = "{{SITE_ROOT}}";
    var LOGGED_IN = {% if request.user.is_authenticated %}true{% else %}false{% endif %};
{% block jsconsts %}{% endblock %}
  </script>
  <link rel="icon" type="image/png" href="{{MEDIA_URL}}rb/images/favicon.png?{{MEDIA_SERIAL}}" />
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/common.css?{{MEDIA_SERIAL}}" />
{% block css %}{% endblock %}
  <!--[if lt IE 7.]>
  <style type="text/css">
    body {
      behavior: url("{{MEDIA_URL}}rb/js/csshover2.htc?{{MEDIA_SERIAL}}");
    }

    img,
    table.sidebyside .commentflag,
    .box.important .box-inner {
      behavior: url("{{MEDIA_URL}}rb/js/pngfix.htc?{{MEDIA_SERIAL}}");
    }
{% block ie6_csshacks %}{% endblock %}
  </style>
  <![endif]-->
  <!--[if lt IE 8.]>
  <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}rb/css/ie_hacks.css?{{MEDIA_SERIAL}}"></script>
  <![endif]-->
{% block scripts %}{% endblock %}
 </head>
{% block bodytag %}
 <body>
{% endblock %}
  <div id="container">
{% block headerbar %}
   <div id="headerbar">
    <ul id="accountnav">
    {% if user.is_authenticated %}
     {% blocktrans with user|realname|escape as username %}<li>Welcome, <b>{{username}}</b></li>{% endblocktrans %}
     <li>- <a href="{% url user-preferences %}">{% trans "My account" %}</a></li>
{% if user.is_staff %}
     <li>- <a href="{% url reviewboard.admin.views.dashboard %}">{% trans "Admin" %}</a></li>
{% endif %}
     <li>- <a href="{% url logout %}">{% trans "Log out" %}</a></li>
{% else %}
     <li><a href="{% url login %}?next_page={{request.path}}">{% trans "Log in" %}</a></li>
{#  XXX Using default sucks, but siteconfig defaults don't #}
{#      work from templates.                               #}
{%  ifequal siteconfig.settings.auth_backend "builtin" %}
{%   if siteconfig.settings.auth_enable_registration|default_if_none:1 %}
     <li>- <a href="{% url register %}">{% trans "Register" %}</a></li>
{%   endif %}
{%  endifequal %}
{% endif %}{# !is_staff #}
     <li>- <a href="http://www.review-board.org/docs/manual/1.0/">{% trans "Documentation" %}</a></li>
     <li>- <a href="http://www.review-board.org/bugs/">{% trans "Bugs" %}</a></li>
     <li>- <a href="http://www.review-board.org/bugs/new/">{% trans "Report bug" %}</a></li>
    </ul>
    <div>
     <img id="logo" src="{{MEDIA_URL}}rb/images/logo.png?{{MEDIA_SERIAL}}" width="60" height="57" alt="" border="0" />
     <h1 id="title"><a href="{% url root %}">Review Board</a></h1>
     <h2 id="beta">{{version}}</h2>
    </div>

   </div>
   {% if user.is_authenticated or not siteconfig.settings.auth_require_sitewide_login %}
   <form method="get" action="{% url search %}">
    <div id="navbar-outer">
     <ul id="navbar">
{% if user.is_authenticated %}
      <li><a href="{% url dashboard %}">{% trans "My Dashboard" %}</a></li>
      <li><a href="{% url new-review-request %}">{% trans "New Review Request" %}</a></li>
      <li>-</li>
{% endif %}
      <li><a href="{% url all-review-requests %}">{% trans "All review requests" %}</a></li>
      <li><a href="{% url all-groups %}">{% trans "Groups" %}</a></li>
      <li><a href="{% url all-users %}">{% trans "Submitters" %}</a></li>
      {% if siteconfig.settings.search_enable %}
      <li id="searchbar">
      <input type="text" name="q" {% attr "value" %}{{query}}{% endattr %} />
       <input type="submit" value="{% trans "Search" %}" />
      </li>
      {% endif %}
     </ul>
    </div>
   </form>
   {% endif %}
{% endblock %}
   <div id="error"></div>
   <div id="content">
{% block content %}{% endblock %}
   </div>
  </div>

{% block scripts-post %}{% endblock %}
 </body>
</html>
